import request from "@/utils/request";

export const querPageApi = (params) =>
  request.get("/depts", { params: params });
export const addDeptApi = (data) => request.post("/depts", data);

//根据Id查询部门
export const getDeptByIdApi = (id) => request.get(`/depts/${id}`);
// 修改部门
export const updateDeptApi = (data) => request.put("/depts", data);
// 删除部门
export const deleteDeptApi = (id) => request.delete(`/depts/${id}`);

// 查询所有部门
export const getAllDeptsApi = () => request.get("/depts/list");
